Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouped Kibana nav #53545

Merged
merged 42 commits into from
Jan 21, 2020
Merged

Grouped Kibana nav #53545

merged 42 commits into from
Jan 21, 2020

Conversation

myasonik
Copy link
Contributor

@myasonik myasonik commented Dec 19, 2019

Summary

Closes #53313

Dev docs

Plugins should now define a category if they have a navigation item:

  • If you want to fit into our default categories, you can use our DEFAULT_APP_CATEGORIES defined in src/core/utils/default_app_categories.ts.
  • If you want to create their own category, you can also provide any object matching the AppCategory interface defined in src/core/types/app_category.ts.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@myasonik myasonik requested a review from joshdover December 19, 2019 00:41
@elasticmachine
Copy link
Contributor

💔 Build Failed

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@snide
Copy link
Contributor

snide commented Jan 7, 2020

Hey @myasonik I think this project is still on for 7.6. Running through the branch I think we'll likely need to make the following changes:

  • Looks like the SIEM link breaks.
  • Don't see an advanced setting to disable the grouping
  • The recently viewed items are not showing the icons from their app, but showing letters
  • We'll need to make it so any clicks in the sub menus close the sub-nav immediately. Right now the menu sticks around and then you need to click again to hide the menu Handled by EuiNavDrawer focus management, flyout auto-close eui#2749

Icons are still on the way as are some small accessibility fixes from @thompsongl

@myasonik
Copy link
Contributor Author

myasonik commented Jan 8, 2020

We'll need to make it so any clicks in the sub menus close the sub-nav immediately. Right now the menu sticks around and then you need to click again to hide the menu

@snide Do you want this to happen in Kibana or in EUI? I think we could do it in either place... If we want this to always to be the case then I'd err towards doing this in EUI but if it's something special for Kibana we can do it on this side.

@thompsongl
Copy link
Contributor

@myasonik @snide Closing the flyout on click seems like something we could default to with EUI. I can't really think of a scenario where keeping it open is desirable.

@snide
Copy link
Contributor

snide commented Jan 8, 2020

Agree with @thompsongl. Let's handle it there.

@snide
Copy link
Contributor

snide commented Jan 10, 2020

Just as an update for anyone tracking. elastic/eui#2749 will fix the not closing problems. I checked to make sure that features controls change the logic of how this stuff appears as written in the spec issue.

Along with the remaining items from #53545 (comment) I added the advanced setting control, which might just be poorly labeled and I can't find it.

Icons are still coming and possibly would need to merge into EUI post feature freeze. I don't think the icons alone should block merging this PR though if product is still OK with the functionality.

@myasonik myasonik marked this pull request as ready for review January 10, 2020 23:00
@myasonik myasonik requested a review from a team as a code owner January 10, 2020 23:00
@myasonik myasonik requested a review from a team January 10, 2020 23:00
@myasonik myasonik requested review from a team as code owners January 10, 2020 23:00
@myasonik
Copy link
Contributor Author

An update on the current state:

  • Should be "feature complete" 🎉
  • The OSS license check is hacky 🐉
  • The advanced setting check is hacky 🐲
  • There are no added tests 😨
  • There are broken tests (some I was able to "fix" by forcing the old nav using the advanced setting but not others) 🔴
  • This probably needs docs still for the API changes and the advanced settings 📖
  • The nav is broken when using the grouped nav but it will magically start working once EUI is updated so if it looks grouped, just trust it works for like a day or two...

src/core/public/application/types.ts Outdated Show resolved Hide resolved
src/core/public/application/index.ts Outdated Show resolved Hide resolved
src/core/public/chrome/chrome_service.tsx Outdated Show resolved Hide resolved
src/core/public/chrome/ui/header/header.tsx Outdated Show resolved Hide resolved
src/core/public/legacy/legacy_service.ts Outdated Show resolved Hide resolved
src/legacy/core_plugins/kibana/index.js Outdated Show resolved Hide resolved
src/core/public/chrome/ui/header/header.tsx Outdated Show resolved Hide resolved
@myasonik myasonik added v7.7.0 and removed v7.6.0 labels Jan 14, 2020
@myasonik myasonik requested a review from a team as a code owner January 14, 2020 23:22
Copy link
Contributor

@lizozom lizozom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elastic/kibana-app-arch changes LGTM

Copy link
Contributor

@Kerry350 Kerry350 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Infra changes LGTM 👍

@myasonik
Copy link
Contributor Author

myasonik commented Jan 16, 2020

@elastic/kibana-platform Would love a re-review on header.tsx and header/header_bits/*.

Just did a bit of a refactor to encapsulate pieces better. Mostly didn't touch logic.

#​1 goal was to make thinking about testing easier.

All of the those changes are in 06a2663.

Copy link
Contributor

@pgayvallet pgayvallet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review as of #53545 (comment)

Extracting the header components is great. Thank for the cleanup.

Just a remark about the folder structure

src/core/public/chrome/ui/header/header.tsx Outdated Show resolved Hide resolved
src/core/public/chrome/ui/header/header_bits/index.tsx Outdated Show resolved Hide resolved
@myasonik
Copy link
Contributor Author

🚨 Merging first thing Tuesday morning unless someone finds a reason not to before then

@myasonik
Copy link
Contributor Author

@elasticmachine merge upstream

@gchaps
Copy link
Contributor

gchaps commented Jan 21, 2020

UI copy in welcome screen LGTM.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@myasonik myasonik merged commit da54657 into elastic:master Jan 21, 2020
@myasonik myasonik deleted the kibana-grouped-nav branch January 21, 2020 17:48
myasonik pushed a commit that referenced this pull request Jan 22, 2020
Adds concept of `category` to nav links, grouping them by this in the side nav
Kerry350 added a commit to Kerry350/kibana that referenced this pull request Jan 22, 2020
@myasonik myasonik mentioned this pull request Feb 18, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REASSIGN from Team:Core UI Deprecated label for old Core UI team release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grouped Kibana nav